﻿using FPSO.Models.Domain;
using FPSO.Services.Utils;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FPSO.Services.Impl
{
	public class DBSystemLogService : DbRepository<SystemLog>
	{
		public void AddSystemLog(SystemLog log)
		{
			log.LogCreateTime = DateTime.Now;
			log.LogUpdateTime = DateTime.Now;
			InsertEntity(log);
		}

		public void DeleteSystemLog(int logid)
		{
			DeleteById(logid);
		}

		public SystemLog GetSystemLog(int logId)
		{
			SystemLog log = QueryEntity(t => t.LogId == logId);
			return log;
		}

		public void UpdateTask(SystemLog log)
		{
			UpdateEntity(log);
		}
	}
}
